package com.zw.a.basic.a12.pojo;

import java.io.Serializable;

//JavaBean类, 叫: 学生类
public class Student implements Serializable {
    //给类加一个 序列化版本号, 如果不加, 系统会默认生成一个.
    private static final long serialVersionUID = 2L;        //值根据需求自己加

    private String name;
    private transient int age;    //transient: 学名叫 瞬态关键字.
    private String email;
    private double salary;


    public Student() {
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
